From: kfraser@localhost.localdomain Date: Thu, 12 Oct 2006 13:28:59 +0000 (+0100) Subject: [HVM] Fix resource leak in error path of AP bringup. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15615^2~7 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=01c26778f4c4880de474fefe60e92b69cfcb3d1d;p=xen.git [HVM] Fix resource leak in error path of AP bringup. Based on a patch from Kouya Shimura. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index cede804db2..06b8de63d9 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -653,15 +653,15 @@ int hvm_bringup_ap(int vcpuid, int trampoline_vector) if ( rc != 0 ) { DPRINTK("AP %d bringup failed in boot_vcpu %x.\n", vcpuid, rc); - return rc; + goto out; } if ( test_and_clear_bit(_VCPUF_down, &d->vcpu[vcpuid]->vcpu_flags) ) vcpu_wake(d->vcpu[vcpuid]); DPRINTK("AP %d bringup suceeded.\n", vcpuid); + out: xfree(ctxt); - return rc; }